package com.majie.leetcode.栈;

import com.majie.algorithm.stack.Stack;

public class _浏览器前进后退 {

    public static void main(String[] args) {
        Stack<String> stack1 = new Stack<>();
        Stack<String> stack2 = new Stack<>();

        stack1.push("jd.con");
        stack1.push("qq.con");
        stack1.push("baidu.con");

        String pop = stack1.pop();
        stack2.push(pop);

        pop = stack1.pop();
        stack2.push(pop);

        pop = stack2.pop();
        stack1.push(pop);

        stack1.push("taobao.com");

    }
}
